x = list(range(1,10))

for y in x :
    y_2 = str(y)
    if y == 1 :
        print(y_2 + 'st')
    elif y == 2 :
        print(y_2 + 'nd')
    elif y == 3 :
        print(y_2 + 'rd')
    else :
        print(y_2 + 'th')

print('\nFinish.')